@extends('admin.layout.index')
<<<<<<< HEAD
@section('js')
<script src="/web/js/libs/jquery-1.8.3.min.js"></script>
<script>
$(function (){
    //通过所属类获取类的所有商品放到select中
    $('[name=tid]').blur(function (){
        val = $(this).val();
        $('[name=gid]').empty();
        $.get('/admin/goods/cate','tid='+val, function (msg){
            //console.log(eval(msg));
            $.each(msg, function (i, n){
                var arr = new Array();
                $.each(n,function (ii, nn){      
                    arr.push(nn);                 
                })
                $('[name=gid]').append("<option value='"+arr[0]+"'>"+arr[1]+"</option>");
            });
        },'json')
    })
})
</script>
@endsection
=======
>>>>>>> 31e42f2d3415b82d4888522298db4e7de5f9c8aa
@section('content')
@if (count($errors) > 0)
    <div class="mws-form-message error">
        <ul>
            @foreach ($errors->all() as $error)
                <li>{{ $error }}</li>
            @endforeach
        </ul>
    </div>
@endif
<div class="mws-panel grid_8">
	<div class="mws-panel-header">
    	<span>商品照片添加</span>
    </div>
    <div class="mws-panel-body no-padding">
<<<<<<< HEAD
    	<form action="/admin/goods/picinsert" class="mws-form" method='post' enctype="multipart/form-data">
=======
    	<form action="/admin/goods/insertpic" class="mws-form" method='post'>
>>>>>>> 31e42f2d3415b82d4888522298db4e7de5f9c8aa
    		{{csrf_field()}}
    		<div class="mws-form-inline">
    			<div class="mws-form-row">
    				<label class="mws-form-label">商品所属类</label>
    				<div class="mws-form-item">
<<<<<<< HEAD
    					<select class="large" name="tid" style="width:200px">
                        <option>--请选择--</option>
                        @foreach($data as $k => $v)
                            <option value="{{$v['id']}}">{{$v['cname']}}</option>
                        @endforeach
                        </select>
=======
    					<input type="text" class="small" name="goodsdes" style="width:200px">
>>>>>>> 31e42f2d3415b82d4888522298db4e7de5f9c8aa
    				</div>
    			</div>
                <div class="mws-form-row">
                    <label class="mws-form-label">商品货号</label>
                    <div class="mws-form-item">
<<<<<<< HEAD
                        <select name="gid" style="width:200px">
                        </select>
=======
                        <input type="text" class="small" name="articlenum" style="width:200px">
>>>>>>> 31e42f2d3415b82d4888522298db4e7de5f9c8aa
                    </div>
                </div>
                <div class="mws-form-row"  style="width:55%;">
                    <label class="mws-form-label">商品首页照片</label>
                    <div class="mws-form-item">
                        <input type="file" class="small" name="goodspic1">
                    </div>
                </div>
                <div class="mws-form-row"  style="width:55%;">
                    <label class="mws-form-label">商品第二张照片</label>
                    <div class="mws-form-item">
                        <input type="file" class="small" name="goodspic2">
                    </div>
                </div>
                <div class="mws-form-row"  style="width:55%;">
                    <label class="mws-form-label">商品第三张照片</label>
                    <div class="mws-form-item">
                        <input type="file" class="small" name="goodspic3">
                    </div>
                </div>
                <div class="mws-form-row"  style="width:55%;">
                    <label class="mws-form-label">商品第四张照片</label>
                    <div class="mws-form-item">
                        <input type="file" class="small" name="goodspic4">
                    </div>
                </div>
                <div class="mws-form-row"  style="width:55%;">
                    <label class="mws-form-label">商品第五张照片</label>
                    <div class="mws-form-item">
                        <input type="file" class="small" name="goodspic5">
                    </div>
                </div>      
    		</div>
    		<div class="mws-button-row">
    			<input type="submit" class="btn btn-danger" value="添加">
    			<input type="reset" class="btn " value="重置">
    		</div>
    	</form>
    </div>    	
</div>
@endsection
